const http = require('http')
http.createServer((req, res) => {
    // res.setHeader('Access-Control-Allow-Origin', '*')
    console.log(req.url);
    var obj = {
        name: '张三',
        sex: '男',
        id: 123
    }
    obj = JSON.stringify(obj)
    // res.end('a(' + obj + ')')
    res.end(obj)
}).listen('3000', () => {
    console.log('serve is running');
})